package com.mazaiting.mail;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ComponentScan;

/**
 * Apollo 应用邮箱服务入口
 */
@RefreshScope
@EnableCaching
@SpringBootApplication
@ComponentScan(basePackages = "com.mazaiting")
@ServletComponentScan(basePackages = "com.mazaiting")
public class ApolloMailApplication {

    /**
     * 日志服务
     */
    private static final Logger logger = LoggerFactory.getLogger(ApolloMailApplication.class);

    public static void main(String[] args) {
        try{
            SpringApplication.run(ApolloMailApplication.class, args);
        }catch(Exception e){
            e.printStackTrace();
        }
        logger.info("项目启动成功");
    }
}
